package com.coincalf.wallet.feign;

import com.coincalf.framework.dto.CoinRechargeDTO;
import com.coincalf.wallet.feign.hystrix.CoinRechargeServiceClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * @author qiang
 */
@FeignClient(value = "coincalf-wallet-service", fallback = CoinRechargeServiceClientFallback.class)
public interface CoinRechargeServiceClient {

    /**
     * 查询充值列表
     *
     * @return
     */
    @RequestMapping(value = "/recharge/pending", method = RequestMethod.GET)
    List<CoinRechargeDTO> queryPendingRecord();

    /**
     * 修改充值记录状态
     *
     * @param coinRecharge
     * @return
     */
    @RequestMapping(value = "/recharge/success", method = RequestMethod.PUT)
    boolean modifyRechargeStatus(@RequestBody CoinRechargeDTO coinRecharge);
}